package com.cn.yz.springboot.util.tablesplit;

import java.util.HashMap;
import java.util.Map;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class TableSplitConfig {

	@Bean
	public StrategyManager strategyManager(){
		StrategyManager strategyManager = new StrategyManager();
		Map<String,String> strategies = new HashMap<String,String>();
		strategies.put("YYYY", "com.cn.yz.springboot.util.tablesplit.impl.YYYYStrategy");
		strategies.put("Remainder", "com.cn.yz.springboot.util.tablesplit.impl.RemainderStrategy");
		strategyManager.setStrategies(strategies);
		return strategyManager;
	}
	
}
